@mixin red {
  color: red;
}

@mixin relative {
  position: relative;
  width: 100%;
  height: 100%;
}

@mixin no-wrap($lines) {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: $lines;
  -webkit-box-orient: vertical;
}

// 单行文本超出隐藏并显示...省略号
@mixin line-text-overflow() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

//多行文本超过行数显示省略号，只适用于WebKit及移动端
@mixin text-overflow($line: 2) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $line;
  overflow: hidden;
}

/* 四周阴影 */
@mixin box-shadow($bulr: 10px, $color: $systemColor) {
  -webkit-box-shadow: 0 0 $bulr $color;
  -moz-box-shadow: 0 0 $bulr $color;
  box-shadow: 0 0 $bulr $color;
}

// flex布局
@mixin layout($dir: column, $justify: center, $align: center) {
  display: flex;
  flex-direction: $dir;
  justify-content: $justify;
  align-items: $align;
}

@mixin userselect($val: none) {
  -webkit-user-select: $val;
  -moz-user-select: $val;
  -ms-user-select: $val;
  user-select: $val;
}
